﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Permission.User.List"
    Title="用户管理" %>
<%@ Import Namespace="Cn.Cellula.Client" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="Stylesheet" href="/Cellula_Client/controls/JskitControls.css" />
    <script type="text/javascript" src="/jskit.org/model/controls/JskitRichDropDownList.js"></script>
    <script type="text/javascript">
        var deptDept = new JskitRichDropDownList("deptDept");
        deptDept.setEmptySelectText("-全部-");
        function PageOnLoad() {
            deptDept.deploy(fixId("txt_Dept"), fixId("hid_Dept"), "Ws/_Dept.aspx");
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
    用户管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <fieldset>
        <legend>查询</legend>
        <table border="0" cellpadding="0" cellspacing="0" class="query_table">
            <tr>
                <td class="query_title">
                    用户名称：
                </td>
                <td class="query_content">
                    <asp:TextBox ID="txt_UserName" runat="server" MaxLength="50"></asp:TextBox>
                </td>
                <td class="query_title">
                    部门：
                </td>
                <td class="query_content">
                    <asp:TextBox runat="server" ID="txt_Dept"></asp:TextBox>
                    <asp:HiddenField runat="server" ID="hid_Dept" />
                </td>
                <td class="query_title">
                    角色：
                </td>
                <td class="query_content">
                    <asp:DropDownList runat="server" ID="ddl_Role">
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </fieldset>
    <div class="action_bar">
        <asp:Button ID="btn_Query" runat="server" Text="查询" OnClick="btn_Query_Click" />
        <asp:Button ID="btn_EOAdd" runat="server" Text="增加" OnClick="btn_EOAdd_Click" />
        <asp:Button ID="btn_EOUpdate" runat="server" Text="修改" OnClientClick="return acu.gv.checkModify(fixId('gvList'));"
            OnClick="btn_EOUpdate_Click" />
        <asp:Button ID="btn_EODel" runat="server" Text="删除" OnClientClick="return acu.gv.checkDelete(fixId('gvList'));"
            OnClick="btn_EODel_Click" />
    </div>
    <fieldset>
        <legend>用户列表</legend>
        <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="false" CssClass="GridView"
            DataKeyNames="UserKey" AllowPaging="True" PageSize="20" PagerSettings-Mode="Numeric"
            OnPageIndexChanging="gvList_PageIndexChanging">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                            type="checkbox" title="点击全选或反全选当前页所有信息" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                    </ItemTemplate>
                    <ItemStyle Width="10px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="头像">
                    <ItemStyle Width="16px" />
                    <ItemTemplate>
                        <img src='<%# ClientBiz.ParseCoverPath(DataBinder.Eval(Container, "DataItem.CoverPath"),"/cellula_client/default/images/face_default.gif")%>' width="16" height="16"
                            alt="" border="0" /></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="帐号">
                    <ItemStyle Width="16px" />
                    <ItemTemplate>
                        <a href='Admin/Permission/User/Edit.aspx?id=<%# DataBinder.Eval(Container, "DataItem.UserKey")%>'>
                            <%# DataBinder.Eval(Container, "DataItem.LoginName")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="UserName" HeaderText="用户名" />
                <asp:BoundField DataField="UserNo" HeaderText="编号" />
                <asp:BoundField DataField="Email" HeaderText="Email" />
                <asp:BoundField DataField="RoleName" HeaderText="角色" />
                <asp:BoundField DataField="DeptName" HeaderText="部门" />
                <asp:BoundField DataField="Duty" HeaderText="职务" />
                <asp:TemplateField HeaderText="性别">
                    <ItemTemplate>
                        <div class='sign_gender<%# DataBinder.Eval(Container, "DataItem.Gender")%>'>
                        </div>
                    </ItemTemplate>
                    <ItemStyle Width="30px" />
                </asp:TemplateField>
                <asp:BoundField DataField="CreateDate" HeaderText="创建时间" />
                <asp:TemplateField HeaderText="状态">
                    <ItemTemplate>
                        <img src='/Cellula_client/Default/Images/sign_activate<%# DataBinder.Eval(Container, "DataItem.ActivatedFlg")%>.png'
                            width="16" height="16" alt="" border="0" /></a>
                    </ItemTemplate>
                    <ItemStyle Width="30px" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                    <a href='Admin/User/EditProfile.aspx?id=<%# DataBinder.Eval(Container, "DataItem.UserKey")%>'
                            title="编辑扩展属性">
                            <img src='/Cellula_client/Default/Images/sign_product_atl_edit.png' width="16" height="16"
                                alt="编辑扩展属性" border="0" /></a></ItemTemplate>
                    <ItemStyle Width="18px" />
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="First"></asp:LinkButton>
                <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Last"></asp:LinkButton>
            </PagerTemplate>
            <HeaderStyle CssClass="GridViewHeader" />
            <RowStyle CssClass="GridViewRow" />
            <FooterStyle CssClass="GirdViewFooter" />
            <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
            <PagerStyle CssClass="GridViewPager" />
            <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
            <EmptyDataTemplate>
                没有可用的数据</EmptyDataTemplate>
        </asp:GridView>
    </fieldset>
</asp:Content>
